import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);

const check = resolve => {
    require.ensure(['../vue/check.vue'], () => {
        resolve(require('../vue/check.vue'));
    });
}

const counter = resolve => {
    require.ensure(['../vue/counter.vue'], () => {
        resolve(require('../vue/counter.vue'));
    });
}

const password = resolve => {
    require.ensure(['../vue/password.vue'], () => {
        resolve(require('../vue/password.vue'));
    });
}

const sucess = resolve => {
    require.ensure(['../vue/sucess.vue'], () => {
        resolve(require('../vue/sucess.vue'));
    });
}

const payway = resolve => {
    require.ensure(['../vue/payway.vue'], () => {
        resolve(require('../vue/payway.vue'));
    });
}
const routes = [{
        path: '/check',
        name: 'check',
        component: check
    },{
        path: '/',
        name: 'check',
        component: check
    },{
        path: '/counter',
        name: 'counter',
        component: counter
    },{
        path: '/password',
        name: 'password',
        component: password
    },{
        path: '/sucess',
        name: 'sucess',
        component: sucess
    },{
        path: '/payway',
        name: 'payway',
        component: payway
    }];

export default new Router({
    mode: 'history',
    base: __dirname,
    routes
}); 